<?php
class num{
	function Add($num1, $num2){
		$arr = array();
		//将两数变为数组
		$arr[0]=$num1;
		$arr[1]=$num2;
		$num = array_sum($arr);
		return $num;
	}
}

$data = new num;
echo $data->Add(5,8);
?>